#小案例 图片复制
#第一步读取图片
with open(r"../testLib/img01/img01.png","rb") as file:
    img = file.read()
#第二步写入图片
path = r"C:/Users/a2038/Desktop/新建文件夹/" #因为r和f冲突,所以把路径分离出来
for i in range(1,10): #复制九份图片,从img01-img10
    with open(f"{path}img0{i}.png","wb") as file:
        file.write(img)
